<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>插值表达式的基本使用</title>
</head>

<body>
  <div class="box">
    <p>{{ msg }}</p>
    <p>{{ friend.name }}</p>
    <p>{{ friend.age }}</p>
    <p>{{friend.age===18?'Jack今年18岁了':'Jack今年不是18岁'}}</p>
  </div>
  <script src="vue.js"></script>
  <script>
    const box = new Vue({
      el: '.box',
      data: {
        msg: 'itheima',
        friend: {
          name: 'Jack',
          age: 18
        }
      }
    })
  </script>
</body>

</html>